/* eslint-disable */
// @ts-ignore
import request from '@/utils/request';
import { CustomRequestOptions } from '@/interceptors/request';

import * as API from './types';

/** 公共配置 GET /api/index/config */
export async function configUsingGet({
  options,
}: {
  options?: CustomRequestOptions;
}) {
  return request<API.AjaxResultMapstring>('/api/index/config', {
    method: 'GET',
    ...(options || {}),
  });
}

/** 装修数据 GET /api/index/decorate */
export async function decorateUsingGet({
  params,
  options,
}: {
  // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
  params: API.decorateUsingGETParams;
  options?: CustomRequestOptions;
}) {
  return request<API.AjaxResultMapstring>('/api/index/decorate', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** 热门搜索 GET /api/index/hotSearch */
export async function hotSearchUsingGet({
  options,
}: {
  options?: CustomRequestOptions;
}) {
  return request<API.AjaxResultListstring>('/api/index/hotSearch', {
    method: 'GET',
    ...(options || {}),
  });
}

/** 首页数据 GET /api/index/index */
export async function indexUsingGet({
  options,
}: {
  options?: CustomRequestOptions;
}) {
  return request<API.AjaxResultMapstring>('/api/index/index', {
    method: 'GET',
    ...(options || {}),
  });
}

/** 政策协议 GET /api/index/policy */
export async function policyUsingGet({
  params,
  options,
}: {
  // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
  params: API.policyUsingGETParams;
  options?: CustomRequestOptions;
}) {
  return request<API.AjaxResultMapstring>('/api/index/policy', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}
